package com.n9.product.entity;

import com.n9.base.entity.UuidEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * 预留记录
 * @author ice
 * @since 2019/6/5 16:12
 */
@Getter
@Setter
@ToString(callSuper = true)
@Entity
@Table(name = "n9_product_reserve_record")
@DynamicUpdate
@DynamicInsert
public class ReserveRecord extends UuidEntity {
    /**
     * 专利对象
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    private Patent patent;
    /**
     * 销售员
     */
    @Column
    private String salesman;
    /**
     * 创建日期
     */
    @Column
    private Date createDate;
    /**
     * 截至日期
     */
    @Column
    private Date expireDate;
    /**
     * 预留状态
     */
    @Column
    @Enumerated(EnumType.STRING)
    private ReserveStatus status;
    /**
     * 备注
     */
    @Column
    private String notes;
}
